import { SearchFormFieldDefinition, MainAttributeInfoInterface } from "@/views/common/ts/Interface";



// 查询表单配置数据.
export const searchFormConfig: SearchFormFieldDefinition[] = [
  {
    queryAttributeName: 'intlLanguageSet',
    queryAttributeLabel: '国际化语言',
    queryEditType: 'select',
    selectOperation: {
      options: [
        {
          value: 'zh',
          label: '中文'
        },
        {
          value: 'en',
          label: '英文'
        }
      ],
    }
  },
  {
    queryAttributeName: 'createTime',
    queryAttributeLabel: '创建时间',
    queryEditType: 'datetime-range',
  },
  {
    queryAttributeName: 'updateTime',
    queryAttributeLabel: '修改时间',
    queryEditType: 'datetime-range',
  }
];


export const tableColumnList: MainAttributeInfoInterface[] = [
  {
    attributeName: 'displayInfoId',
    attributeLabel: '主键',
    editType: 'text',
    unInsertable: true,
    unUpdatable: true,
    isDefaultHidden: true,
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'appName',
    attributeLabel: '应用名称22',
    editType: 'text',
    rules: [
      {
        required: true,
        message: '应用名称不能为空。'
      },
      {
        type: 'string',
        max: 32,
        message: '应用名称长度不能超过32个字符。'
      }
    ],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'pageName',
    attributeLabel: '页面名称',
    editType: 'text',
    rules: [
      {
        required: true,
        message: '页面名称不能为空。'
      },
      {
        type: 'string',
        max: 128,
        message: '页面名称长度不能超过128个字符。'
      }
    ],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'intlLanguage',
    attributeLabel: '国际化语言',
    editType: 'select',
    rules: [
      {
        required: true,
        message: '国际化语言不能为空。'
      }
    ],
    selectOperation: {
      options: [
        {
          value: 'zh',
          label: '中文'
        },
        {
          value: 'en',
          label: '英文'
        }
      ],
    },
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'displayInfo',
    attributeLabel: '当前交互信息',
    editType: 'textarea',
    rules: [
      {
        required: true,
        message: '当前交互信息不能为空。'
      }
    ],
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'displayInfoPreVersion',
    attributeLabel: '前版本交互信息',
    editType: 'textarea',
    unInsertable: true,
    unUpdatable: true,
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'createTime',
    attributeLabel: '创建时间',
    editType: 'text',
    isSortable: true,
    unInsertable: true,
    unUpdatable: true,
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'updateTime',
    attributeLabel: '修改时间',
    editType: 'text',
    isSortable: true,
    unInsertable: true,
    unUpdatable: true,
    extendsAttributeInfo: {}
  },
  {
    attributeName: 'isDelete',
    attributeLabel: '删除',
    editType: 'text',
    unInsertable: true,
    unUpdatable: true,
    isDefaultHidden: true,
    extendsAttributeInfo: {}
  }
];


/**
* 后台服务URI配置信息
*/
//export const batchDeleteUri = "/mock/api/domain-address/displayInfo-view/batchDeleteDisplayInfoList";
export const batchDeleteUri = "/web-display-server/displayInfo/batchDeleteDisplayInfoList";
export const fetchListUri = "/web-display-server/displayInfo/selectDisplayInfoList";
export const fetchDetailUri = "/web-display-server/displayInfo/selectDisplayInfoList";
export const addUri = "/web-display-server/displayInfo/saveDisplayInfo";
export const updateUri = "/web-display-server/displayInfo/saveDisplayInfo";
export const downloadExcelUri = "/web-display-server/webDisplayServerExcel/downloadExcel";
export const primaryKey = "displayInfoId";
export const entityName = "displayInfo";